<?php
declare (strict_types = 1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class CollegeModel extends Model
{
    //
    //院校信息
    protected $table = 'college';   //数据表
    protected $pk = 'college_id';  //主键

    protected $schema=[
        'college_id' => 'int',
        'college_name' => 'string',
        'college_city' => 'string',
        'college_belong' => 'string',
        'college_label' => 'string',
        'college_yz_url' => 'string',
        'college_gf_url' => 'string',
        'college_img' => 'string',
        'college_info' => 'string',
    ];

    public static function getAllCollegeInfo()
    {
        return CollegeModel::field('college_id,college_name,college_city,college_belong,college_label,college_yz_url,college_gf_url,college_img,college_info')->select();
    }

    public static function getColByColId($college_id)
    {
        return CollegeModel::where('college_id',$college_id)->find();
    }

}
